package com.lvandroid.player.activity;

import android.os.Bundle;
import android.widget.FrameLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.lvandroid.play.player.AllRoundPlayer;
import com.lvandroid.play.player.AllRoundPlayerManager;
import com.lvandroid.player.R;

public class HtmlPlayerActivity extends AppCompatActivity {

    FrameLayout mContainer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_html_player);
        mContainer = findViewById(R.id.container);

    }

    @Override
    protected void onResume() {
        super.onResume();
        AllRoundPlayer player = AllRoundPlayerManager.createPlayer(
                AllRoundPlayerManager.MEDIA_TYPE_HTML);
        player.setDataSource("https://image.baidu.com/");
        player.setDisplay(mContainer);
        player.start();
    }
}